# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
import time,json,requests,threading


driver = webdriver.Firefox()
driver.get('https://www.liepin.com/city-hz/zpdaoyoua/')
vivo = webdriver.Firefox()
vivo.get('https://passport.vivo.com/#/login?client_id=30&redirect_uri=https%3A%2F%2Fwww.vivo.com%2F')
mg = webdriver.Firefox()
mg.get('https://www.mgtv.com/')
rmrb = webdriver.Firefox()
rmrb.get('http://stcn.com/')
xq = webdriver.Firefox()
xq.get('https://xueqiu.com/?md5__1038=QqGxcDnDyiitnD05o4%2Br%3DWYG%3D%3DqD5w%2BNdx')
ks = webdriver.Firefox()
ks.get('https://www.kuaishou.com/new-reco')

mobile=18573122260

def head():
	boss=driver.find_element(By.CSS_SELECTOR,".header-quick-menu-not-login .ant-btn.ant-btn-primary.ant-btn-lg")
	boss.click()
	boss=driver.find_element(By.CSS_SELECTOR,".ant-input-affix-wrapper.ant-input-affix-wrapper-lg .ant-input.ant-input-lg")
	boss.send_keys(mobile)
def head1():
	time.sleep(10)
	v=vivo.find_element(By.CSS_SELECTOR,".phone-box .input")
	# v.click()
	v.send_keys(mobile)
def head2():
	mgtv=mg.find_element(By.CSS_SELECTOR,".g-page-channel .m-agreement-content .btn .allow")
	mgtv.click()
	mgtv=mg.find_element(By.CSS_SELECTOR,".rightnav.rightnav-nav1 .list .user a")
	mgtv.click()
	mgtv=mg.find_element(By.CSS_SELECTOR,".sms-login.account .hitv-input.is-round.account-input.zIndex .prepend.prefix")
	mgtv.send_keys(mobile)
def head3():
	rm=rmrb.find_element(By.CSS_SELECTOR,".top-bar .top-bar-inner .r a[login-btn=\"\"]")
	rm.click()
	rm=rmrb.find_element(By.CSS_SELECTOR,".pop-window.login-pop-window .switch-login-type-tab span:nth-of-type(2)")
	rm.click()
	rm=rmrb.find_element(By.CSS_SELECTOR,".login-phone-code-in")
	rm.send_keys(mobile)
def head4():
	xqs=xq.find_element(By.CSS_SELECTOR,".newLogin_form-group_2wq input")
	xqs.send_keys(mobile)
	xqs=xq.find_element(By.CSS_SELECTOR,".newLogin_modal__login__automatic_3Jf.newLogin_modal__login__automatic_new_3-d .iconfont_iconfont_9UW")
	xqs.click()
def head5():
	ksh=ks.find_element(By.CSS_SELECTOR,".toolbar-item.user-info-item .user-default")
	ksh.click()
	ksh=ks.find_element(By.CSS_SELECTOR,".navigation-bar.login-modal-bar .navigation-bar-item:nth-of-type(2) .navigation-link")
	ksh.click()
	ksh=ks.find_element(By.CSS_SELECTOR,".verify-login-input.pl-input-container.radius input")
	ksh.send_keys(mobile)
	


def a():

	boss=driver.find_element(By.CSS_SELECTOR,".get-smscode-btn.get-smscode-btn-active")
	boss.click()

def b():
	
	v=vivo.find_element(By.CSS_SELECTOR,".get-code-pc.ellipsis .get span")
	v.click()

def c():

	mgtv=mg.find_element(By.CSS_SELECTOR,".send-code")
	mgtv.click()

def d():

	rm=rmrb.find_element(By.CSS_SELECTOR,".login-send-phone-code-btn.send-phone-code-btn")
	rm.click()
	
def e():
	
	xqs=xq.find_element(By.CSS_SELECTOR,".newLogin_form-group-addon_XmE .newLogin_send-code_-fb.newLogin_active_2CK")
	xqs.click()
	
def f():

	ksh=ks.find_element(By.CSS_SELECTOR,".get-verification.has-phone")
	ksh.click()
	

if __name__ == '__main__':
	head()
	head1()
	head2()
	head3()
	head4()
	head5()
	time.sleep(30)
	while(True):
		a()
		b()
		c()
		d()
		e()
		f()
		time.sleep(60)
